import {adminUrl} from "@/utils/baseUrl.js"
import request from '@/utils/request'

// 创建教室分类
export function createClassroomCategory(data) {
  return request({
    url: adminUrl + '/collegebase/classroom-category/create',
    method: 'post',
    data: data
  })
}

// 更新教室分类
export function updateClassroomCategory(data) {
  return request({
    url: adminUrl + '/collegebase/classroom-category/update',
    method: 'put',
    data: data
  })
}

// 删除教室分类
export function deleteClassroomCategory(id) {
  return request({
    url: adminUrl + '/collegebase/classroom-category/delete?id=' + id,
    method: 'delete'
  })
}

// 获得教室分类
export function getClassroomCategory(id) {
  return request({
    url: adminUrl + '/collegebase/classroom-category/get?id=' + id,
    method: 'get'
  })
}

// 获得教室分类分页
export function getClassroomCategoryPage(query) {
  return request({
    url: adminUrl + '/collegebase/classroom-category/page',
    method: 'get',
    params: query
  })
}

// 导出教室分类 Excel
export function exportClassroomCategoryExcel(query) {
  return request({
    url: adminUrl + '/collegebase/classroom-category/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
